package com.example.springboot.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.sql.Timestamp;

@Data
public class ProductVo {
    @JsonProperty("id")
    private int id;
    @JsonProperty("title")
    private String title;
    @JsonProperty("pic_path")
    private String picPath;
    @JsonProperty("original_price")
    private BigDecimal originalPrice;
    @JsonProperty("sale_price")
    private BigDecimal salePrice;
    @JsonProperty("procity")
    private String procity;
    @JsonProperty("real_sales")
    private String realSales;
    @JsonProperty("nick")
    private String nick;
    @JsonProperty("detail_url")
    private String detailUrl;
    @JsonProperty("created_at")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private Timestamp createdAt;
    @JsonProperty("updated_at")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private Timestamp updatedAt;
}
